<template>
  <div class="tabbar-wrap">
    <div class="item" @click="TabIndexChange(0)">
<!--      <img src="../../assets/video/健康.png" style="width: 20px;height: 20px;"/>-->
      <router-link to="/healthy" :class="tabIndex==0?'active':''">健康</router-link>
<!--      <div>健康</div>-->
    </div>
    <div class="item" @click="TabIndexChange(1)">
      <router-link to="/follow" :class="tabIndex==1?'active':''">视界</router-link>
    </div>
    <div class="item" @click="TabIndexChange(2)">
      <router-link to="/content" :class="tabIndex==2?'active':''">
        <img src="../../static/imgs/add.png" alt />
      </router-link>
    </div>
    <div class="item" @click="TabIndexChange(3)">
      <router-link to="/shopping" :class="tabIndex==3?'active':''">商城</router-link>
    </div>
    <div class="item" @click="TabIndexChange(4)">
      <router-link to="/person" :class="tabIndex==4?'active':''">个人</router-link>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tabIndex:1,
    };
  },
  methods: {
    TabIndexChange(index) {
      this.tabIndex = index;
    }
  }
};
</script>

<style lang="less" scoped>
a {
  color: #ccc;
  text-decoration: none;
}
.hidden{
  visibility: hidden;
}
.visible{
  visibility: visible;
}
.tabbar-wrap {
  position: fixed;
  background-color: #ffffff;
  bottom: 0;
  z-index: 99;
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  .item {
    flex: 1;
    text-align: center;
    color: #ccc;
    font-size: 18px;
    .active {
      color: cadetblue;
    }
    img {
      width: 40px;
      height: 40px;
      //margin-top: 10px;
    }
  }
}
</style>